<template>
    <div class="header">
      <div class="header-left">
        <i class="iconfont backIcon">&#xe624;</i>
      </div>
      <div class="header-input">
        <i class="iconfont">&#xe632;</i>
        <i>输入城市/景点/游玩主题</i>
      </div>
      <router-link to="/city">
        <div class="header-right">
          <i>{{city}}</i>
          <i class="iconfont triangleIcon">&#xe615;</i>
        </div>
      </router-link>
    </div>
</template>

<script>
import {mapState} from 'vuex'
export default {
  name: 'Header',
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="stylus" scoped>
  @import "~_styles/varibles.styl"
  .header
    display flex
    line-height .86rem
    background-color $bgColor
    color #fff
  .header-left
    width .64rem
    float left
    .backIcon
      display block
      text-align center
  .header-input
    flex 1
    height .68rem
    line-height .68rem
    margin-top .08rem
    margin-right .2rem
    padding-left .1rem
    border-radius .1rem
    background-color #fff
    color #ccc
  .header-right
    min-width .8rem
    padding 0 .1rem
    float right
    color #fff
    .triangleIcon
      font-size .25rem
</style>
